package temp.lho.lws.mapper;

import org.apache.ibatis.annotations.Param;
import temp.lho.lws.pojo.Flowinfomation;
import temp.lho.lws.vo.Accident;
import temp.lho.lws.vo.LoginVo;

import java.util.List;

/**
 * (Flowinfomation)表数据库访问层
 *
 * @author makejava
 * @since 2020-07-06 22:45:02
 */
public interface FlowinfomationMapper extends IBaseMapper {

    /**
     * 查询流程
     * @param taskname 流程名称
     * @param userId 用户id
     * @param jobstate 流程状态
     * @return
     */
    List<Flowinfomation> findFlowDetail(@Param("taskname") String taskname,
                                        @Param("userId") Integer userId,
                                        @Param("jobstate") Integer jobstate);

    /**
     * 修改任务状态
     * @param taskid 流程id
     * @param jobstate 状态id
     * @return
     */
    int updateJobStatus(@Param("taskid") Integer taskid,
                        @Param("jobstate") Integer jobstate,
                        @Param("transmitstate") Integer transmitstate,
                        @Param("user") LoginVo user);


    /**
     * 添加下一步流程
     * @param flowinfomation
     * @return
     */
    int addNextFlow(Flowinfomation flowinfomation);


    int insert( Accident accident);


    int Fupdate(@Param("jobState")int jobState,@Param("claimMainId") String claimMainId);

    /**
     * 根据节点id查询流程
     * @param taskid
     * @return
     */
    Flowinfomation findByTaskId(Integer taskid);

}